<?php

#################################################################
#								HTML
#################################################################

/**
 * Default layout registed as 'layout/default'
 * 
 * $vars['page_title']			Page title (String)
 * $vars['page_description']	Page description (String)
 * $vars['page_keywords']		Page description (String)
 * $vars['language']			Page language (2 letters string)
 * $vars['content']				Page content (String)
 */

if($_CONTEXT=='HTML'){
	
	/*** MODs ***/
	if(blg_get_config('mod_ui-jquery_is_active')){
		$_CSS_STACK->push(blg_get_site_url().'mod/ui-jquery/css/'.blg_get_config('mod_ui-jquery_interface').'/jquery-ui-1.8.17.custom.css', TRUE);
		$_JS_STACK->push(blg_get_site_url().'mod/ui-jquery/js/jquery-ui-1.8.17.custom.min.js', TRUE);
	}
	
	/*** DEFAULTs ***/
	$_CSS_STACK->push(blg_get_site_url().'layout/default.css', TRUE);
	$_JS_STACK->push(blg_get_site_url().'layout/default.js', TRUE);

	$_CSS_STACK->push(blg_get_site_url().'default.css', TRUE);
	$_JS_STACK->push(blg_get_site_url().'default.js', TRUE);

	/*** JQUERY ***/	
	$_JS_STACK->push(blg_get_site_url().'jquery.js', TRUE);		

	// Header params
	$page_title= 	blg_extract($vars, 'page_title', blg_get_config('site_title'));
	$language= 		blg_extract($vars, 'language', blg_get_config('site_language'));
	$favicon= 		blg_get_site_url().blg_get_config('favicon_relative_path');	
	
	$page_description=	blg_extract($vars, 'page_description', blg_get_config('page_description'));
	$page_keywords=		blg_extract($vars, 'page_keywords', blg_get_config('page_keywords'));
	$page_robots=		blg_extract($vars, 'page_robots', blg_get_config('page_robots'));
	
	$css_links = blg_view('css');	// CSS stylsheets
	$js_links= blg_view('js');		// JS scripts

echo <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$language" lang="$language">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="content-language" content="$language" />
	<meta name="description" content="$page_description" />
	<meta name="keywords" content="$page_keywords" />
	<meta name="robots" content="$page_robots" />	
	<title>$page_title</title>
	<link rel="shortcut icon" href="$favicon" />
	$css_links
	$js_links
</head>
<body>
$vars[content]
</body>
</html>
HTML;

}
#################################################################
#								JS
#################################################################
elseif($_CONTEXT=='JS'){ ?>

<?php }
#################################################################
#								CSS
#################################################################
elseif($_CONTEXT=='CSS'){ ?>

/*********************** BODY ***********************/

html, body{
	height: 100%;
	background: url('<?php echo blg_get_site_url()?>_graphics/default/structure/bg.jpg') no-repeat center center fixed;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;	
}

<?php }
